package com.souyun.serverblogapi.config;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import com.netflix.loadbalancer.RoundRobinRule;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@RibbonClient(name = "server-blog-article", configuration = SuijiRuleConfig.class)
public class SuijiRuleConfig {

    @Bean
    public IRule ribbonRule() {
        return new RandomRule();
    }
}
